<template>
  <div>
    <el-breadcrumb :separator-icon="ArrowRight">
      <el-breadcrumb-item
        :to="{ path: '/' }"
        @click="watchFolderFiles({ fileId: 0, fileName: '所有文件' })"
        >全部文件</el-breadcrumb-item
      >
      <el-breadcrumb-item
        v-for="(item, index) in props.dataList"
        :key="index"
        @click="watchFolderFiles(item)"
        >{{ item.fileName }}</el-breadcrumb-item
      >
    </el-breadcrumb>
  </div>
</template>

<script setup>
import { ArrowRight } from "@element-plus/icons-vue";
import { ref, reactive, getCurrentInstance, nextTick } from "vue";
import { useRouter, useRoute } from "vue-router";
const { proxy } = getCurrentInstance();

const props = defineProps({
  dataList: {
    type: Array,
    default: [],
  },
});
const api = {
  getFolderInfo: "/file/getFolderInfo",
  getFolderInfo4Admin: "/admin/getFolderInfo",
  getFolderInfo4share: "/showShare/getFolderInfo",
};

const router = useRouter();
const route = useRoute();
const emit = defineEmits(["watchFolderFiles"]);
const watchFolderFiles = async (item) => {
  emit("watchFolderFiles", item);
};
</script>
<style lang="scss" scoped>
:deep(.el-breadcrumb__item .el-breadcrumb__inner) {
  user-select: none;
  &:hover {
    cursor: pointer;
    color: #3b82f6; // 可选：高亮颜色
  }
}
</style>
